package Demo1;

import java.util.Scanner;

public class Student {
    //属性：学号、姓名、性别、密码
    private String stuNo;
    private String stuName;
    private  String password;
    private char gender;
    public Student(String stuNo,String stuName,String password,char gender){
        this.stuNo=stuNo;
        this.stuName=stuName;
        this.password=password;
        this.gender=gender;
    }
    public Student(String stuNo,String stuName,char gender){
        this.stuNo=stuNo;
        this.stuName=stuName;
        this.gender=gender;
    }


    public String getStuNo() {
        return stuNo;
    }

    public void setStuNo(String stuNo) {
        this.stuNo = stuNo;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    //选课
    public boolean selectCourse(Course coo,int currentSelectCourseNum){
        if(currentSelectCourseNum<coo.getSelectCourseMaxNum()){
            return true;
        }
        return false;
    }
//    public void addStu(String stuNo,String stuName,String password,char gender){
//
//    }
    //查看自己的信息
    public void displayStudentInfo(){
        System.out.println("学号："+stuNo+",姓名"+stuName+",性别"+gender);
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuNo='" + stuNo + '\'' +
                ", stuName='" + stuName + '\'' +
                ", password='" + password + '\'' +
                ", gender=" + gender +
                '}';
    }

}
